package com.headwind.logistics.system.service.impl;

import com.headwind.logistics.common.pojo.GoodsIssueType;
import com.headwind.logistics.system.mapper.GoodsIssueTypeMapper;
import com.headwind.logistics.system.service.intl.GoodsIssueTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author你爸爸 Date2020/7/22 15:52
 * Version 1.0
 * DESCRIPTION
 */
@Service
public class GoodsIssueTypeServiceImpl implements GoodsIssueTypeService {
    @Autowired
    private GoodsIssueTypeMapper goodsIssueTypeMapper;

    @Override
    public List<GoodsIssueType> selectGoodsIssueType(Integer page, Integer rows, String goodsIssueTypeName) {
        if (page != null){
            page = (page-1)*rows;
        }
        return goodsIssueTypeMapper.selectGoodsIssueType(page,rows,goodsIssueTypeName);
    }

    @Override
    public int insertGoodsIssueType(GoodsIssueType goodsIssueType) {
        return goodsIssueTypeMapper.insertGoodsIssueType(goodsIssueType);
    }

    @Override
    public int deleteGoodsIssueType(Long goodsIssueTypeId) {
        return goodsIssueTypeMapper.deleteGoodsIssueType(goodsIssueTypeId);
    }

    @Override
    public int updateGoodsIssueType(GoodsIssueType goodsIssueType) {
        return goodsIssueTypeMapper.updateGoodsIssueType(goodsIssueType);
    }
}
